﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">

    <Color x:Key="TextBoxBackgroundColor">#70000000</Color>
    <Color x:Key="TextBoxBorderColor">#FFFFA500</Color>
    <Color x:Key="TextBoxDisabledBackgroundColor">#00FFA500</Color>
    <Color x:Key="TextBoxDisabledBorderColor">#50FFA500</Color>
    <Color x:Key="TextBoxTextColor">#FFFFA500</Color>
    <Color x:Key="TextBoxCaretColor">#FFFFA500</Color>
    <Color x:Key="TextBoxHighlightColor">#90FFA500</Color>

    <LinearGradientBrush x:Key="TextBoxBorderBrush" Opacity="1">
        <GradientStop Color="#FFFFA500" Offset="0"/>
        <GradientStop Color="#00FFA500" Offset="1"/>
    </LinearGradientBrush>

    <Style TargetType="{x:Type TextBox}">
        <Setter Property="SnapsToDevicePixels" Value="True" />
        <Setter Property="OverridesDefaultStyle" Value="True" />
        <Setter Property="KeyboardNavigation.TabNavigation" Value="None" />
        <Setter Property="FocusVisualStyle" Value="{x:Null}" />
        <Setter Property="MinHeight" Value="20" />
        <Setter Property="AllowDrop" Value="true" />
        <Setter Property="TextBlock.Foreground">
            <Setter.Value>
                <SolidColorBrush Color="{StaticResource TextBoxTextColor}"/>
            </Setter.Value>
        </Setter>
        <Setter Property="Background">
            <Setter.Value>
                <SolidColorBrush Color="{StaticResource TextBoxBackgroundColor}" />
            </Setter.Value>
        </Setter>
        <Setter Property="CaretBrush">
            <Setter.Value>
                <SolidColorBrush Color="{StaticResource TextBoxCaretColor}"/>
            </Setter.Value>
        </Setter>
        <Setter Property="SelectionBrush">
            <Setter.Value>
                <SolidColorBrush Color="{StaticResource TextBoxHighlightColor}"/>
            </Setter.Value>
        </Setter>
        <Setter Property="BorderBrush" Value="{StaticResource TextBoxBorderBrush}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type TextBoxBase}">
                    <Border Name="Border"
                            CornerRadius="0"
                            Padding="2"
                            BorderThickness="1"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            Background="{TemplateBinding Background}">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal" />
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName="Border" Storyboard.TargetProperty="(Panel.Background).(SolidColorBrush.Color)">
                                            <EasingColorKeyFrame KeyTime="0" Value="{StaticResource TextBoxDisabledBackgroundColor}" />
                                        </ColorAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="ReadOnly">
                                    <Storyboard>
                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName="Border" Storyboard.TargetProperty="(Panel.Background).(SolidColorBrush.Color)">
                                            <EasingColorKeyFrame KeyTime="0" Value="{StaticResource TextBoxDisabledBackgroundColor}" />
                                        </ColorAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="MouseOver" />
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <ScrollViewer Margin="0" x:Name="PART_ContentHost" />
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

</ResourceDictionary>